
<script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
<!-- //Custom Theme files -->
<link rel="stylesheet" href="__ROOT__/Apps/Home/View/cake/css/bootstrap.css" />
<link rel="stylesheet" href="__ROOT__/Apps/Home/View/cake/css/style.css" />

<link rel="stylesheet" href="__ROOT__/Apps/Home/View/default/css/common.css">
<link rel="stylesheet" href="__ROOT__/Apps/Home/View/default/css/regist.css">
<link rel="stylesheet" href="__ROOT__/Apps/Home/View/default/css/passport.css">

<!-- cart -->
<script src="__ROOT__/Apps/Home/View/cake/js/simpleCart.min.js"></script>
<!-- cart -->
</head>
<body>
	<include file="./Apps/Home/View/cake/Public/header_nav.html" />
	<!--header-->
	<div class="header">
		<div class="container">
			<nav class="navbar navbar-default" role="navigation">
				<div class="navbar-header">
					<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
						<span class="sr-only">Toggle navigation</span>
						<span class="icon-bar"></span>
						<span class="icon-bar"></span>
						<span class="icon-bar"></span>
					</button>
					<h1 class="navbar-brand"><a  href="{:U('/Home/Index/index')}">Adamry</a></h1>
				</div>
				<!--navbar-header-->
				<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
					<ul class="nav navbar-nav">
						<li><a href="{:U('/Home/Index/index')}" class="active">首页</a></li>

					<if condition="$shopscates">
						<li class="dropdown">
							<a href="#" class="dropdown-toggle" data-toggle="dropdown">蛋糕<b class="caret"></b></a>
							<ul class="dropdown-menu multi-column columns-4">
								<div class="row">

								<volist name="shopscates" key="k" id="vo">
									<div class="col-sm-3">
										<h4>{:WSTMSubstr($vo["catName"],0,12)}</h4>
										<ul class="multi-column-dropdown">
										<volist name="vo['children']" key="k2" id="vo2">
											<li><a class="list" href="{:U('Home/Shops/toShopHome/',array('shopId'=>$vo2['shopId'],'ct1'=>$vo['catId'],'ct2'=>$vo2['catId']))}">{:WSTMSubstr($vo2["catName"],0,12)}</a></li>
										</volist>
										</ul>
									</div>
								</volist>
								</div>
							</ul>
						</li>
					</if>

						<li class="dropdown grid"><a href="/index.php/Home/Articles?articleId=8">活动专享</a></li>
						<li class="dropdown grid"><a href="/index.php/Home/Articles?articleId=9">企业合作</a></li>
						<li class="dropdown grid"><a href="/index.php/Home/Articles?articleId=10">订购帮助</a></li>
						<li class="dropdown grid"><a href="/index.php/Home/Articles?articleId=11">关于Adamry</a></li>
					</ul>
					<!--/.navbar-collapse-->
				</div>
				<!--//navbar-header-->
			</nav>
			<div class="header-info">
				<div class="header-right search-box">
					<a href="#"><span class="glyphicon glyphicon-search" aria-hidden="true"></span></a>				
					<!-- <div class="search">
						<form class="navbar-form">
							<input type="text" class="form-control">
							<button type="submit" class="btn btn-default" aria-label="Left Align">
								搜索
							</button>
						</form>
					</div>	 -->
				</div>

				<div class="header-right login">
					<a href="#"><span class="glyphicon glyphicon-user" aria-hidden="true"></span></a>
					<div id="loginBox">
					<!-- 登录前 -->
					<if condition="!$WST_USER['userId']">
						<form id="loginForm">
							<fieldset id="body">
								<a href="{:U('Home/Users/login')}" id="login">登录</a>
							</fieldset>
							<p>新用户 ？ <a class="sign" href="{:U('Home/Users/regist')}">免费注册</a> <span>忘记密码 ？<a class="sign" href="#">找回</a></span></p>
						</form>
					</if>
					<!-- 登录中 -->
					<if condition="$WST_USER['userId'] gt 0">
						<form id="loginForm">
							<fieldset id="body">
								<a href="javascript:logout();" id="login">退出登录</a>
							</fieldset>
						</form>
					</if>

					</div>
				</div>

			<!-- 显示买、卖家中心 -->
			<if condition="$WST_USER['userId']">
				<div class="header-right cart">
					<a href="#"><span class="glyphicon glyphicon-home" aria-hidden="true"></span></a>
					<div class="cart-box">
						<PHP>if(session('WST_USER.userId')>0){</PHP>
							<PHP>if(session('WST_USER.userType')==0){</PHP>
								<p><a href="{:U('Home/Users/index')}" class="simpleCart_empty">买家中心</a></p>
							<PHP>}else{</PHP>
							    <PHP>if(session('WST_USER.loginTarget')==0){</PHP>
							    	<p><a href="{:U('Home/Shops/index')}" class="simpleCart_empty">卖家中心</a></p>
							    <PHP>}else{</PHP>
							    	<p><a href="{:U('Home/Users/index')}" class="simpleCart_empty">买家中心</a></p>
							    <PHP>}</PHP>
							<PHP>}</PHP>
						<PHP>}else{</PHP>
						    <!-- <p><a href="{:U('Home/Shops/toOpenShopByUser')}" class="simpleCart_empty">我要开店</a></p> -->
						<PHP>}</PHP>

					</div>
				</div>
			</if>


			</div>

		</div>
	</div>
	<!--//header-->
